﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a 3D shape model for 3D matching.</summary>
	// Token: 0x02000062 RID: 98
	[Serializable]
	public class HShapeModel3D : HHandle, ISerializable, ICloneable
	{
		// Token: 0x060017D3 RID: 6099 RVA: 0x0000883B File Offset: 0x00006A3B
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HShapeModel3D() : base(HHandleBase.UNDEF)
		{
		}

		// Token: 0x060017D4 RID: 6100 RVA: 0x000997C0 File Offset: 0x000979C0
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HShapeModel3D(IntPtr handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060017D5 RID: 6101 RVA: 0x000997CF File Offset: 0x000979CF
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HShapeModel3D(HHandle handle) : base(handle)
		{
			this.AssertSemType();
		}

		// Token: 0x060017D6 RID: 6102 RVA: 0x000997DE File Offset: 0x000979DE
		private void AssertSemType()
		{
			base.AssertSemType("shape_model_3d");
		}

		// Token: 0x060017D7 RID: 6103 RVA: 0x000997EB File Offset: 0x000979EB
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HShapeModel3D obj)
		{
			obj = new HShapeModel3D(HHandleBase.UNDEF);
			return obj.Load(proc, parIndex, err);
		}

		// Token: 0x060017D8 RID: 6104 RVA: 0x00099804 File Offset: 0x00097A04
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HShapeModel3D[] obj)
		{
			HTuple htuple;
			err = HTuple.LoadNew(proc, parIndex, err, out htuple);
			obj = new HShapeModel3D[htuple.Length];
			for (int i = 0; i < htuple.Length; i++)
			{
				obj[i] = new HShapeModel3D(HalconAPI.IsLegacyHandleMode() ? htuple[i].IP : htuple[i].H);
			}
			htuple.Dispose();
			return err;
		}

		/// <summary>
		///   Read a 3D shape model from a file.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="fileName">File name.</param>
		// Token: 0x060017D9 RID: 6105 RVA: 0x00099874 File Offset: 0x00097A74
		public HShapeModel3D(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1052);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Prepare a 3D object model for matching.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="refRotX">Reference orientation: Rotation around x-axis or x component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotY">Reference orientation: Rotation around y-axis or y component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotZ">Reference orientation: Rotation around z-axis or z component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="orderOfRotation">Meaning of the rotation values of the reference orientation. Default: "gba"</param>
		/// <param name="longitudeMin">Minimum longitude of the model views. Default: -0.35</param>
		/// <param name="longitudeMax">Maximum longitude of the model views. Default: 0.35</param>
		/// <param name="latitudeMin">Minimum latitude of the model views. Default: -0.35</param>
		/// <param name="latitudeMax">Maximum latitude of the model views. Default: 0.35</param>
		/// <param name="camRollMin">Minimum camera roll angle of the model views. Default: -3.1416</param>
		/// <param name="camRollMax">Maximum camera roll angle of the model views. Default: 3.1416</param>
		/// <param name="distMin">Minimum camera-object-distance of the model views. Default: 0.3</param>
		/// <param name="distMax">Maximum camera-object-distance of the model views. Default: 0.4</param>
		/// <param name="minContrast">Minimum contrast of the objects in the search images. Default: 10</param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		// Token: 0x060017DA RID: 6106 RVA: 0x000998C0 File Offset: 0x00097AC0
		public HShapeModel3D(HObjectModel3D objectModel3D, HCamPar camParam, double refRotX, double refRotY, double refRotZ, string orderOfRotation, double longitudeMin, double longitudeMax, double latitudeMin, double latitudeMax, double camRollMin, double camRollMax, double distMin, double distMax, int minContrast, HTuple genParamName, HTuple genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1059);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.StoreD(proc, 2, refRotX);
			HalconAPI.StoreD(proc, 3, refRotY);
			HalconAPI.StoreD(proc, 4, refRotZ);
			HalconAPI.StoreS(proc, 5, orderOfRotation);
			HalconAPI.StoreD(proc, 6, longitudeMin);
			HalconAPI.StoreD(proc, 7, longitudeMax);
			HalconAPI.StoreD(proc, 8, latitudeMin);
			HalconAPI.StoreD(proc, 9, latitudeMax);
			HalconAPI.StoreD(proc, 10, camRollMin);
			HalconAPI.StoreD(proc, 11, camRollMax);
			HalconAPI.StoreD(proc, 12, distMin);
			HalconAPI.StoreD(proc, 13, distMax);
			HalconAPI.StoreI(proc, 14, minContrast);
			HalconAPI.Store(proc, 15, genParamName);
			HalconAPI.Store(proc, 16, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Prepare a 3D object model for matching.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="refRotX">Reference orientation: Rotation around x-axis or x component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotY">Reference orientation: Rotation around y-axis or y component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotZ">Reference orientation: Rotation around z-axis or z component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="orderOfRotation">Meaning of the rotation values of the reference orientation. Default: "gba"</param>
		/// <param name="longitudeMin">Minimum longitude of the model views. Default: -0.35</param>
		/// <param name="longitudeMax">Maximum longitude of the model views. Default: 0.35</param>
		/// <param name="latitudeMin">Minimum latitude of the model views. Default: -0.35</param>
		/// <param name="latitudeMax">Maximum latitude of the model views. Default: 0.35</param>
		/// <param name="camRollMin">Minimum camera roll angle of the model views. Default: -3.1416</param>
		/// <param name="camRollMax">Maximum camera roll angle of the model views. Default: 3.1416</param>
		/// <param name="distMin">Minimum camera-object-distance of the model views. Default: 0.3</param>
		/// <param name="distMax">Maximum camera-object-distance of the model views. Default: 0.4</param>
		/// <param name="minContrast">Minimum contrast of the objects in the search images. Default: 10</param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		// Token: 0x060017DB RID: 6107 RVA: 0x000999C8 File Offset: 0x00097BC8
		public HShapeModel3D(HObjectModel3D objectModel3D, HCamPar camParam, double refRotX, double refRotY, double refRotZ, string orderOfRotation, double longitudeMin, double longitudeMax, double latitudeMin, double latitudeMax, double camRollMin, double camRollMax, double distMin, double distMax, int minContrast, string genParamName, int genParamValue)
		{
			IntPtr proc = HalconAPI.PreCall(1059);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.StoreD(proc, 2, refRotX);
			HalconAPI.StoreD(proc, 3, refRotY);
			HalconAPI.StoreD(proc, 4, refRotZ);
			HalconAPI.StoreS(proc, 5, orderOfRotation);
			HalconAPI.StoreD(proc, 6, longitudeMin);
			HalconAPI.StoreD(proc, 7, longitudeMax);
			HalconAPI.StoreD(proc, 8, latitudeMin);
			HalconAPI.StoreD(proc, 9, latitudeMax);
			HalconAPI.StoreD(proc, 10, camRollMin);
			HalconAPI.StoreD(proc, 11, camRollMax);
			HalconAPI.StoreD(proc, 12, distMin);
			HalconAPI.StoreD(proc, 13, distMax);
			HalconAPI.StoreI(proc, 14, minContrast);
			HalconAPI.StoreS(proc, 15, genParamName);
			HalconAPI.StoreI(proc, 16, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		// Token: 0x060017DC RID: 6108 RVA: 0x00099AC0 File Offset: 0x00097CC0
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeShapeModel3d();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x060017DD RID: 6109 RVA: 0x00099AF8 File Offset: 0x00097CF8
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HShapeModel3D(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeShapeModel3d(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x060017DE RID: 6110 RVA: 0x00099B38 File Offset: 0x00097D38
		public new void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeShapeModel3d();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x060017DF RID: 6111 RVA: 0x00099B4C File Offset: 0x00097D4C
		public new static HShapeModel3D Deserialize(Stream stream)
		{
			HShapeModel3D hshapeModel3D = new HShapeModel3D();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hshapeModel3D.DeserializeShapeModel3d(hserializedItem);
			hserializedItem.Dispose();
			return hshapeModel3D;
		}

		// Token: 0x060017E0 RID: 6112 RVA: 0x00099B72 File Offset: 0x00097D72
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x060017E1 RID: 6113 RVA: 0x00099B7C File Offset: 0x00097D7C
		public new HShapeModel3D Clone()
		{
			HSerializedItem hserializedItem = this.SerializeShapeModel3d();
			HShapeModel3D hshapeModel3D = new HShapeModel3D();
			hshapeModel3D.DeserializeShapeModel3d(hserializedItem);
			hserializedItem.Dispose();
			return hshapeModel3D;
		}

		/// <summary>Free the memory of a 3D shape model.</summary>
		/// <param name="shapeModel3DID">Handle of the 3D shape model.</param>
		// Token: 0x060017E2 RID: 6114 RVA: 0x00099BA4 File Offset: 0x00097DA4
		public static void ClearShapeModel3d(HShapeModel3D[] shapeModel3DID)
		{
			HTuple htuple = HHandleBase.ConcatArray(shapeModel3DID);
			IntPtr proc = HalconAPI.PreCall(1049);
			HalconAPI.Store(proc, 0, htuple);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(shapeModel3DID);
		}

		/// <summary>
		///   Free the memory of a 3D shape model.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		// Token: 0x060017E3 RID: 6115 RVA: 0x00099BE8 File Offset: 0x00097DE8
		public void ClearShapeModel3d()
		{
			IntPtr proc = HalconAPI.PreCall(1049);
			base.Store(proc, 0);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Deserialize a serialized 3D shape model.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x060017E4 RID: 6116 RVA: 0x00099C1C File Offset: 0x00097E1C
		public void DeserializeShapeModel3d(HSerializedItem serializedItemHandle)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1050);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>
		///   Serialize a 3D shape model.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x060017E5 RID: 6117 RVA: 0x00099C70 File Offset: 0x00097E70
		public HSerializedItem SerializeShapeModel3d()
		{
			IntPtr proc = HalconAPI.PreCall(1051);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read a 3D shape model from a file.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="fileName">File name.</param>
		// Token: 0x060017E6 RID: 6118 RVA: 0x00099CB8 File Offset: 0x00097EB8
		public void ReadShapeModel3d(string fileName)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1052);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Write a 3D shape model to a file.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="fileName">File name.</param>
		// Token: 0x060017E7 RID: 6119 RVA: 0x00099D04 File Offset: 0x00097F04
		public void WriteShapeModel3d(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1053);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Transform a pose that refers to the coordinate system of a 3D object model to a pose that refers to the reference coordinate system of a 3D shape model and vice versa.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="poseIn">Pose to be transformed in the source system.</param>
		/// <param name="transformation">Direction of the transformation. Default: "ref_to_model"</param>
		/// <returns>Transformed 3D pose in the target system.</returns>
		// Token: 0x060017E8 RID: 6120 RVA: 0x00099D40 File Offset: 0x00097F40
		public HPose TransPoseShapeModel3d(HPose poseIn, string transformation)
		{
			IntPtr proc = HalconAPI.PreCall(1054);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, poseIn);
			HalconAPI.StoreS(proc, 2, transformation);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(poseIn);
			HPose result;
			num = HPose.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Project the edges of a 3D shape model into image coordinates.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="pose">3D pose of the 3D shape model in the world coordinate system.</param>
		/// <param name="hiddenSurfaceRemoval">Remove hidden surfaces? Default: "true"</param>
		/// <param name="minFaceAngle">Smallest face angle for which the edge is displayed Default: 0.523599</param>
		/// <returns>Contour representation of the model view.</returns>
		// Token: 0x060017E9 RID: 6121 RVA: 0x00099DA8 File Offset: 0x00097FA8
		public HXLDCont ProjectShapeModel3d(HCamPar camParam, HPose pose, string hiddenSurfaceRemoval, HTuple minFaceAngle)
		{
			IntPtr proc = HalconAPI.PreCall(1055);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.Store(proc, 2, pose);
			HalconAPI.StoreS(proc, 3, hiddenSurfaceRemoval);
			HalconAPI.Store(proc, 4, minFaceAngle);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			HalconAPI.UnpinTuple(pose);
			HalconAPI.UnpinTuple(minFaceAngle);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Project the edges of a 3D shape model into image coordinates.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="pose">3D pose of the 3D shape model in the world coordinate system.</param>
		/// <param name="hiddenSurfaceRemoval">Remove hidden surfaces? Default: "true"</param>
		/// <param name="minFaceAngle">Smallest face angle for which the edge is displayed Default: 0.523599</param>
		/// <returns>Contour representation of the model view.</returns>
		// Token: 0x060017EA RID: 6122 RVA: 0x00099E38 File Offset: 0x00098038
		public HXLDCont ProjectShapeModel3d(HCamPar camParam, HPose pose, string hiddenSurfaceRemoval, double minFaceAngle)
		{
			IntPtr proc = HalconAPI.PreCall(1055);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.Store(proc, 2, pose);
			HalconAPI.StoreS(proc, 3, hiddenSurfaceRemoval);
			HalconAPI.StoreD(proc, 4, minFaceAngle);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			HalconAPI.UnpinTuple(pose);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the contour representation of a 3D shape model view.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="level">Pyramid level for which the contour representation should be returned. Default: 1</param>
		/// <param name="view">View for which the contour representation should be returned. Default: 1</param>
		/// <param name="viewPose">3D pose of the 3D shape model at the current view.</param>
		/// <returns>Contour representation of the model view.</returns>
		// Token: 0x060017EB RID: 6123 RVA: 0x00099EC4 File Offset: 0x000980C4
		public HXLDCont GetShapeModel3dContours(int level, int view, out HPose viewPose)
		{
			IntPtr proc = HalconAPI.PreCall(1056);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, level);
			HalconAPI.StoreI(proc, 2, view);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HXLDCont result;
			num = HXLDCont.LoadNew(proc, 1, num, out result);
			num = HPose.LoadNew(proc, 0, num, out viewPose);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the parameters of a 3D shape model.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the 3D shape model. Default: "num_levels_max"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x060017EC RID: 6124 RVA: 0x00099F30 File Offset: 0x00098130
		public HTuple GetShapeModel3dParams(HTuple genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1057);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(genParamName);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the parameters of a 3D shape model.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="genParamName">Names of the generic parameters that are to be queried for the 3D shape model. Default: "num_levels_max"</param>
		/// <returns>Values of the generic parameters.</returns>
		// Token: 0x060017ED RID: 6125 RVA: 0x00099F88 File Offset: 0x00098188
		public HTuple GetShapeModel3dParams(string genParamName)
		{
			IntPtr proc = HalconAPI.PreCall(1057);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, genParamName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Find the best matches of a 3D shape model in an image.
		///   Instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="image">Input image in which the model should be found.</param>
		/// <param name="minScore">Minimum score of the instances of the model to be found. Default: 0.7</param>
		/// <param name="greediness">"Greediness" of the search heuristic (0: safe but slow; 1: fast but matches may be missed). Default: 0.9</param>
		/// <param name="numLevels">Number of pyramid levels used in the matching (and lowest pyramid level to use if $|NumLevels| = 2$). Default: 0</param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		/// <param name="covPose">6 standard deviations or 36 covariances of the pose parameters.</param>
		/// <param name="score">Score of the found instances of the 3D shape model.</param>
		/// <returns>3D pose of the 3D shape model.</returns>
		// Token: 0x060017EE RID: 6126 RVA: 0x00099FD8 File Offset: 0x000981D8
		public HPose[] FindShapeModel3d(HImage image, double minScore, double greediness, HTuple numLevels, HTuple genParamName, HTuple genParamValue, out HTuple covPose, out HTuple score)
		{
			IntPtr proc = HalconAPI.PreCall(1058);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, image);
			HalconAPI.StoreD(proc, 1, minScore);
			HalconAPI.StoreD(proc, 2, greediness);
			HalconAPI.Store(proc, 3, numLevels);
			HalconAPI.Store(proc, 4, genParamName);
			HalconAPI.Store(proc, 5, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(numLevels);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			num = HTuple.LoadNew(proc, 1, HTupleType.DOUBLE, num, out covPose);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out score);
			HalconAPI.PostCall(proc, num);
			HPose[] result = HPose.SplitArray(data);
			GC.KeepAlive(this);
			GC.KeepAlive(image);
			return result;
		}

		/// <summary>
		///   Prepare a 3D object model for matching.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="refRotX">Reference orientation: Rotation around x-axis or x component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotY">Reference orientation: Rotation around y-axis or y component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotZ">Reference orientation: Rotation around z-axis or z component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="orderOfRotation">Meaning of the rotation values of the reference orientation. Default: "gba"</param>
		/// <param name="longitudeMin">Minimum longitude of the model views. Default: -0.35</param>
		/// <param name="longitudeMax">Maximum longitude of the model views. Default: 0.35</param>
		/// <param name="latitudeMin">Minimum latitude of the model views. Default: -0.35</param>
		/// <param name="latitudeMax">Maximum latitude of the model views. Default: 0.35</param>
		/// <param name="camRollMin">Minimum camera roll angle of the model views. Default: -3.1416</param>
		/// <param name="camRollMax">Maximum camera roll angle of the model views. Default: 3.1416</param>
		/// <param name="distMin">Minimum camera-object-distance of the model views. Default: 0.3</param>
		/// <param name="distMax">Maximum camera-object-distance of the model views. Default: 0.4</param>
		/// <param name="minContrast">Minimum contrast of the objects in the search images. Default: 10</param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		// Token: 0x060017EF RID: 6127 RVA: 0x0009A09C File Offset: 0x0009829C
		public void CreateShapeModel3d(HObjectModel3D objectModel3D, HCamPar camParam, double refRotX, double refRotY, double refRotZ, string orderOfRotation, double longitudeMin, double longitudeMax, double latitudeMin, double latitudeMax, double camRollMin, double camRollMax, double distMin, double distMax, int minContrast, HTuple genParamName, HTuple genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1059);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.StoreD(proc, 2, refRotX);
			HalconAPI.StoreD(proc, 3, refRotY);
			HalconAPI.StoreD(proc, 4, refRotZ);
			HalconAPI.StoreS(proc, 5, orderOfRotation);
			HalconAPI.StoreD(proc, 6, longitudeMin);
			HalconAPI.StoreD(proc, 7, longitudeMax);
			HalconAPI.StoreD(proc, 8, latitudeMin);
			HalconAPI.StoreD(proc, 9, latitudeMax);
			HalconAPI.StoreD(proc, 10, camRollMin);
			HalconAPI.StoreD(proc, 11, camRollMax);
			HalconAPI.StoreD(proc, 12, distMin);
			HalconAPI.StoreD(proc, 13, distMax);
			HalconAPI.StoreI(proc, 14, minContrast);
			HalconAPI.Store(proc, 15, genParamName);
			HalconAPI.Store(proc, 16, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			HalconAPI.UnpinTuple(genParamName);
			HalconAPI.UnpinTuple(genParamValue);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}

		/// <summary>
		///   Prepare a 3D object model for matching.
		///   Modified instance represents: Handle of the 3D shape model.
		/// </summary>
		/// <param name="objectModel3D">Handle of the 3D object model.</param>
		/// <param name="camParam">Internal camera parameters.</param>
		/// <param name="refRotX">Reference orientation: Rotation around x-axis or x component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotY">Reference orientation: Rotation around y-axis or y component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="refRotZ">Reference orientation: Rotation around z-axis or z component of the Rodriguez vector (in radians or without unit). Default: 0</param>
		/// <param name="orderOfRotation">Meaning of the rotation values of the reference orientation. Default: "gba"</param>
		/// <param name="longitudeMin">Minimum longitude of the model views. Default: -0.35</param>
		/// <param name="longitudeMax">Maximum longitude of the model views. Default: 0.35</param>
		/// <param name="latitudeMin">Minimum latitude of the model views. Default: -0.35</param>
		/// <param name="latitudeMax">Maximum latitude of the model views. Default: 0.35</param>
		/// <param name="camRollMin">Minimum camera roll angle of the model views. Default: -3.1416</param>
		/// <param name="camRollMax">Maximum camera roll angle of the model views. Default: 3.1416</param>
		/// <param name="distMin">Minimum camera-object-distance of the model views. Default: 0.3</param>
		/// <param name="distMax">Maximum camera-object-distance of the model views. Default: 0.4</param>
		/// <param name="minContrast">Minimum contrast of the objects in the search images. Default: 10</param>
		/// <param name="genParamName">Names of (optional) parameters for controlling the behavior of the operator. Default: []</param>
		/// <param name="genParamValue">Values of the optional generic parameters. Default: []</param>
		// Token: 0x060017F0 RID: 6128 RVA: 0x0009A1A4 File Offset: 0x000983A4
		public void CreateShapeModel3d(HObjectModel3D objectModel3D, HCamPar camParam, double refRotX, double refRotY, double refRotZ, string orderOfRotation, double longitudeMin, double longitudeMax, double latitudeMin, double latitudeMax, double camRollMin, double camRollMax, double distMin, double distMax, int minContrast, string genParamName, int genParamValue)
		{
			this.Dispose();
			IntPtr proc = HalconAPI.PreCall(1059);
			HalconAPI.Store(proc, 0, objectModel3D);
			HalconAPI.Store(proc, 1, camParam);
			HalconAPI.StoreD(proc, 2, refRotX);
			HalconAPI.StoreD(proc, 3, refRotY);
			HalconAPI.StoreD(proc, 4, refRotZ);
			HalconAPI.StoreS(proc, 5, orderOfRotation);
			HalconAPI.StoreD(proc, 6, longitudeMin);
			HalconAPI.StoreD(proc, 7, longitudeMax);
			HalconAPI.StoreD(proc, 8, latitudeMin);
			HalconAPI.StoreD(proc, 9, latitudeMax);
			HalconAPI.StoreD(proc, 10, camRollMin);
			HalconAPI.StoreD(proc, 11, camRollMax);
			HalconAPI.StoreD(proc, 12, distMin);
			HalconAPI.StoreD(proc, 13, distMax);
			HalconAPI.StoreI(proc, 14, minContrast);
			HalconAPI.StoreS(proc, 15, genParamName);
			HalconAPI.StoreI(proc, 16, genParamValue);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(camParam);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(objectModel3D);
		}
	}
}
